// 递归将所有类型转为可选
export type DeepPartial<T> = {
	[K in keyof T]?: T[K] extends {} ? DeepPartial<T[K]> : T[K];
};

// 请求列表类接口时的参数的最外层统一类型
export interface PagePayload<T = any> {
	pageNo: number;
	pageSize: number;
	param?: T;
}
// 接口返回的最外层类型
export interface IRes<T = any> {
	code: number;
	data: T;
	message: string;
}
export interface IResList<T = any> {
	code: number;
	data: T[];
	message: string;
}

// 列表类接口返回时data的统一类型
export interface IResPage<T = any> {
	code: number;
	data: {
		pageCount: number;
		pageNo: number;
		pageSize: number;
		results: T;
		totalCount: number;
	};
	message: string;
}

// 列表查询时的返回类型
export interface IResPageList<T = any> {
	code: number;
	data: {
		pageCount: number;
		pageNo: number;
		pageSize: number;
		results: T[];
		totalCount: number;
	};
	message: string;
}
